#include "all.h"
bool add_node_behind(LinkList*list,int data){
    Node*new_node=(Node*)malloc(sizeof(Node));
    if(new_node==NULL){
        printf("error :new_node is NULL");
        return false;
    }
    new_node->data=data;
    new_node->next=NULL; 
    if(list->size==0){
        list->head=new_node;
        list->tail=new_node;
        list->size++;
        return true;
    }
    list->tail->next=new_node;
    list->tail=new_node;
    list->size++;
    return true;
}
LinkList* createLinkList(void){
    return (LinkList*)calloc(1,sizeof(LinkList));
}

void print_LinkList(LinkList*list){
    Node*curr=list->head;
    while(curr!=NULL){
        printf("%d->",curr->data);
        curr=curr->next;
    }
    curr=NULL;
    free(curr);
    printf("NULL\n");
}








